//
// Created by wangyg98 on 2025/5/7.
//

#ifndef PLANTVSPLANT_SCENE_H
#define PLANTVSPLANT_SCENE_H

#include <graphics.h>
#include <memory>

class Scene{
public:
    Scene()=default;
    ~Scene()=default;

    virtual void on_enter() = 0;
    virtual void on_update() = 0;
    virtual void on_draw() = 0;
    virtual void on_input(const ExMessage& msg) = 0;
    virtual void on_exit() = 0;
private:
};

class SceneManager{
public:
    ~SceneManager();

    static SceneManager& GetInstance();

    void Initialize();

    void SwitchToGame();
    void SwitchToMenu();

    Scene* GetCurrentScene();

private:
    SceneManager() = default;
    std::shared_ptr<Scene> menu_scene;
    std::shared_ptr<Scene> game_scene;
    std::shared_ptr<Scene> current_scene;
};

#endif //PLANTVSPLANT_SCENE_H
